package cn.com.connext.scrm.repository.master;


import cn.com.connext.scrm.domain.master.DwaQuestionnaire;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface DwaQuestionnaireRepository extends JpaRepository<DwaQuestionnaire, Long>, JpaSpecificationExecutor {
    @Query(value = "select count(1) from dwa_questionnaire", nativeQuery = true)
    Integer findUserClickQuestionNaire();

    @Query(value = "select distinct union_id from dwa_questionnaire", nativeQuery = true)
    List<String> findNoRepeatUserClickQuestionNaire();
}
